package com.jwsoft.manager.core.task.jhjy;

import com.alibaba.fastjson.JSON;
import com.jwsoft.manager.common.vo.common.AreaControlVO;
import com.jwsoft.manager.core.integration.EduSyncDyApproveIntegration;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 金华报名审核数据同步
 *
 * @author chenzh
 */
@Component
@Slf4j
public class ShTaskJob {
    @Autowired
    EduSyncDyApproveIntegration eduSyncDyApproveIntegration;

    @XxlJob("syncJhjyShData")
    public void jhjyLqJobHandler() {
        XxlJobHelper.log("XXL-JOB, syncJhjyShData");
        String str = XxlJobHelper.getJobParam();
        AreaControlVO vo = JSON.parseObject(str, AreaControlVO.class);
        log.info("金华教育金华审核数据同步开始");
        eduSyncDyApproveIntegration.eduJhjyShSync(vo);
        log.info("金华教育金华审核数据同步结束");
    }
}
